package p2000;

import java.util.Scanner;

public class Main2096小明A加B {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int t = input.nextInt();
        while (t-- > 0) {
            int a = (input.nextInt()) % 100;
            int b = (input.nextInt()) % 100;
            long sum = 0;
            sum = (a + b) % 100;
            System.out.println(sum);
        }
    }
} 